<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCKeditor" %>
<%@ page import="org.apache.struts.taglib.html.Constants" %> 
<%@ page import="org.apache.struts.Globals" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="x-ua-compatible" content="ie=7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改评选人信息</title>
<link href="/webvote/pages/style/main.css" rel="stylesheet" type="text/css" />
<link  rel ="stylesheet"  type ="text/css"  href ="/webvote/pages/ext/resources/css/ext-all.css" /> 
<script  type ="text/javascript"  src ="/webvote/pages/ext/adapter/ext/ext-base.js" ></script> 
<script  type ="text/javascript"  src ="/webvote/pages/ext/ext-all.js" ></script> 
<script type="text/javascript" src="/webvote/pages/js/vote.js"></script>
<script type="text/javascript" src="/webvote/pages/js/jquery-1.3.1.js"></script>
<script type="text/javascript" src="/webvote/FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
    function SetWinHeight(obj) 
    { 
       var win=obj; 
       if (document.getElementById) 
       { 
            if (win && !window.opera) 
            { 
               if (win.contentDocument && win.contentDocument.body.offsetHeight) 
                   win.height = win.contentDocument.body.offsetHeight; 
                   else if(win.Document && win.Document.body.scrollHeight) 
                   win.height = win.Document.body.scrollHeight; 
            } 
       } 
    } 
    
</script>
<script type="text/javascript">
<!--

//-->
 function callback(msg)
{
	document.getElementById("viimg").value=msg;
	document.getElementById("img").src= "/webvote/upload/"+msg;
}
</script>
<%org.apache.struts.util.TokenProcessor.getInstance().saveToken(request);
	%>
</head>

<body style=" width:100%; background:url(/webvote/pages/images/index-1_15.gif) repeat-x #f3f3f3;">
<div class="c-top f14"><img src="/webvote/pages/images/download2 r.gif" /><p>您当前所在的位置：<span>投票信息</span>>><span>修改评选人信息</span></p></div>
<div class="biaodan" style="height:100%;width:100%;overflow:auto;">
          <form name="voteForm" method="post" >
          <input type="hidden" name="<%=Constants.TOKEN_KEY%>"    value="<%=session.getAttribute(Globals.TRANSACTION_TOKEN_KEY)%>"/> 
          <input type="hidden" id="viimg" value="${vi.viImgpath}"/>
          <input type="hidden" id="viid" value="${vi.viId}"/>
          <ul>
          <li><div>姓名：</div><input id="viname" name="viname" type="text" value="${vi.viName}"/><span>*长度限制在１－２０字节</span></li>  
          <li><div>性别：</div><select name="visex"> 
                                  <c:choose>
									<c:when test="${vi.viSex eq '男'}">
									    <option value="男">男</option>
									</c:when>
									<c:otherwise>
									    <option value="女">女</option>
									</c:otherwise>
			                     </c:choose>
                             </select>
          </li> 
          <li><div>年龄：</div><input id="viage" name="viage" type="text" value="${vi.viAge}"/><span>*如：22*</span></li> 
          <li style="height: auto;"><div>简介：</div>
              <textarea id="viintro" name="viintro" rows="5" cols="18">${vi.viIntro}</textarea>  
          </li>
          <li style="height: 600px;"><div>事迹内容：</div> <textarea id="vicontent" name="vicontent" style="WIDTH: 600px; HEIGHT: 600px">${vi.viContent}</textarea>
									 <script type="text/javascript">  
                                         var oFCKeditor = new FCKeditor('vicontent') ;  
                                         oFCKeditor.BasePath = "/webvote/FCKeditor/" ; 
                                         oFCKeditor.Width=600;
                                         oFCKeditor.Height = 600;  
                                         oFCKeditor.ToolbarSet = "Default" ;  
                                         oFCKeditor.ReplaceTextarea();  
                                     </script>
    	  </li>
    	  <li><div>评选类型：</div>
          		<select name="vitype">
                                <option selected="selected" value="select">——请选择评选类型——</option>
                    			<c:forEach var="type" items="${alltypes}">
                    			   <c:choose>
									<c:when test="${vi.typeinfo.tiId eq type.tiId}">
									    <option value="${type.tiId}" selected="selected">${type.tiName}</option>
									</c:when>
									<c:otherwise>
									    <option value="${type.tiId}" selected="selected">${type.tiName}</option>
									</c:otherwise>
			                     </c:choose>
                    			</c:forEach>
                </select>
          </li>
          </ul>
          </form>
          <form name="fileForm"  action="/webvote/uploadfile" method="post"  enctype="multipart/form-data" target="hidden_frame">  
          <ul>
          <li style="height: 80px;"><div>头像：</div> 
          <input type="file" id="myfile" name="myfile"/><input type="button" value="上传" onclick="checkfile()" style="width:60px; height:26px;"/>   
          <span><img id="img" src='/webvote/upload/${vi.viImgpath}' width='80' height='80'/></span>  
          </li>                                                                       
          </ul>
         </form>
         <iframe name='hidden_frame' id="hidden_frame" style='display:none'></iframe>
          <div class="anniu"><input  type="button" onclick="updateVoter()" value="修&nbsp;&nbsp;&nbsp;改" /><input name="" type="button" value="重&nbsp;&nbsp;&nbsp;置" onclick="javascript:reset()"/></div>
  </div>
</body>
</html>

